<template>
  <KView class="bargain-record-view">
    <KView class="bargain-record-view-title">砍价记录</KView>
    <KView class="bargain-record-view-content">
      <bargain-record-item v-for="record in records" :key="record.id" :record="record">
      </bargain-record-item>
    </KView>
  </KView>
</template>

<script>
  import BargainRecordItem from './bargainRecordItem';

  export default {
    props: {
      records: {
        type: Array,
        required: true
      }
    },

    data() {
      return {};
    },

    components: {
      BargainRecordItem
    }
  };

</script>

<style lang="scss">
  .bargain-record-view {
    height: 100%;
    overflow: auto;

    .bargain-record-view-title {
      border-left: formatPx(10) solid #FD5A3A;
      font-size: formatPx(36);
      padding-left: formatPx(15);
      line-height: formatPx(40);
      height: formatPx(40);
    }

    .bargain-record-view-content {
      margin-top: formatPx(30);
      height: calc(100% - #{formatPx(70)});
      overflow: auto;
      .bargain-record-item{
        margin-bottom: formatPx(30);
        &:last-child{
          margin-bottom: 0;
        }
      }
    }
  }

</style>
